using System;
using System.Text;

namespace Catastrophe.AutoSulution.TaskM
{
	public class SchdException
	{
		/// <summary>
		/// 异常信息
		/// </summary>
		public Exception Exp { get; set; }

		/// <summary>
		/// 执行失败的结果信息
		/// </summary>
		public string Message { get; set; }

		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder();
			if (this.Exp != null)
			{
				StringBuilder stringBuilder2 = stringBuilder;
				StringBuilder stringBuilder3 = stringBuilder2;
				StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(11, 2, stringBuilder2);
				handler.AppendLiteral("任务发生无法处理的异常");
				handler.AppendFormatted(Environment.NewLine);
				handler.AppendFormatted(this.Exp);
				stringBuilder3.Append(ref handler);
			}
			if (!string.IsNullOrWhiteSpace(this.Message))
			{
				StringBuilder stringBuilder2 = stringBuilder;
				StringBuilder stringBuilder4 = stringBuilder2;
				StringBuilder.AppendInterpolatedStringHandler handler = new StringBuilder.AppendInterpolatedStringHandler(10, 2, stringBuilder2);
				handler.AppendLiteral("任务执行失败，详情:");
				handler.AppendFormatted(Environment.NewLine);
				handler.AppendFormatted(this.Message);
				stringBuilder4.Append(ref handler);
			}
			return stringBuilder.ToString();
		}
	}
}
